func net/http.bodyAllowedForStatus
10 uses
net/http (current package)
response.go#L313: if r1.ContentLength == 0 && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode) {
server.go#L1290: if w.handlerDone.isSet() && !trailers && !hasTE && bodyAllowedForStatus(w.status) && header.get("Content-Length") == "" && (!isHEAD || len(p) > 0) {
server.go#L1307: if w.wants10KeepAlive && (isHEAD || hasCL || !bodyAllowedForStatus(w.status)) {
server.go#L1399: if bodyAllowedForStatus(code) {
server.go#L1429: if w.req.Method == "HEAD" || !bodyAllowedForStatus(code) || code == StatusNoContent {
server.go#L1535: return bodyAllowedForStatus(w.status)
transfer.go#L455: func bodyAllowedForStatus(status int) bool {
transfer.go#L477: case !bodyAllowedForStatus(status):
transfer.go#L548: if realLength == -1 && !t.Chunked && bodyAllowedForStatus(t.StatusCode) {
transfer.go#L558: if noResponseBodyExpected(t.RequestMethod) || !bodyAllowedForStatus(t.StatusCode) {